package a.j.b;

import a.c.bb;
import a.c.w;
import a.d.t;
import a.d.u;
import a.j.a.b;
import a.j.a.j;
import a.j.g;
import a.j.h;
import a.j.*;

import java.awt.*;
import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class e
  extends a
{
  public static final byte g = 1;
  public static final byte h = 2;
  public static final byte i = 3;
  private byte j = 2;
  protected f.r_ k = null;
  protected f.p_ l = null;
  protected f.p_ m = null;
  protected f.n_ n = null;
  protected f.n_ o = null;
  private static final byte p = 0;
  private static final byte q = 1;
  private static final byte r = 2;
  private static final byte s = 3;
  private static final byte t = 4;
  private byte u = 0;
  private double v = 5.0D;
  private double w;
  private double x;
  private Rectangle2D y;
  private Rectangle2D z;
  private Rectangle2D A;
  private double B;
  private double C;
  protected double D;
  protected double E;
  private g.c_ F = new g.c_();
  private g.c_ G = new g.c_();
  private g.c_ H = new g.c_();
  private g.b_ I;
  private g.b_ J;
  private g.b_ K;
  private boolean L = true;
  private boolean M;
  private m N = new m();
  public static int O;
  
  public m h()
  {
    return this.N;
  }
  
  public void a(m paramm)
  {
    this.N = paramm;
  }
  
  public boolean a(double paramDouble1, double paramDouble2)
  {
    int i5 = f.Wb;
    boolean bool = f.Vb;
    i();
    if (i5 == 0) {
      if (this.e != null)
      {
        if (i5 != 0) {
          break label1215;
        }
        if (this.f != null)
        {
          sc localsc = new sc(this.e, paramDouble1, paramDouble2, true);
          a.c.e locale = localsc.m();
          if (i5 != 0) {
            break label1218;
          }
          if (locale != null)
          {
            g localg = this.e.a();
            if (i5 != 0) {
              break label1218;
            }
            if ((localg != null) && (a(localg, locale) == this.f))
            {
              byte b = a(new t(this.f.a(), this.f.b(), this.f.c(), this.f.d()), paramDouble1, paramDouble2, n());
              if (i5 == 0)
              {
                if (b != 0)
                {
                  this.u = b;
                  this.k = this.f.eb();
                }
              }
              else
              {
                if (i5 == 0)
                {
                  label282:
                  label284:
                  f.n_ localn_1;
                  switch (b)
                  {
                  case 1: 
                    localp_1 = this.f.eb().e(0);
                    do
                    {
                      if (localp_1.o().isEmpty()) {
                        break;
                      }
                      localp_1 = localp_1.e(0);
                      if (i5 != 0) {
                        break label284;
                      }
                      if (bool) {
                        break label282;
                      }
                    } while (!bool);
                    if (i5 == 0)
                    {
                      this.l = localp_1;
                      if (i5 != 0) {
                        break label591;
                      }
                      if (!bool) {
                        break label590;
                      }
                    }
                  case 3: 
                    localObject1 = this.f.eb().o();
                    localp_1 = (f.p_)((List)localObject1).get(((List)localObject1).size() - 1);
                    if (!localp_1.o().isEmpty()) {
                      localObject1 = localp_1.o();
                    }
                    while (i5 != 0)
                    {
                      localp_1 = (f.p_)((List)localObject1).get(((List)localObject1).size() - 1);
                      if (i5 != 0) {
                        break label400;
                      }
                      if (bool) {
                        break label398;
                      }
                      if (!bool) {
                        break;
                      }
                    }
                    this.l = localp_1;
                    if (i5 == 0) {
                      if (!bool) {}
                    }
                    break;
                  case 2: 
                    localn_1 = this.f.eb().c(0);
                    do
                    {
                      if (localn_1.l().isEmpty()) {
                        break;
                      }
                      localn_1 = localn_1.c(0);
                      if (i5 != 0) {
                        break label476;
                      }
                      if (bool) {
                        break label474;
                      }
                    } while (!bool);
                    if (i5 == 0)
                    {
                      this.n = localn_1;
                      if (i5 != 0) {
                        break label591;
                      }
                      if (!bool) {
                        break label590;
                      }
                    }
                  case 4: 
                    label398:
                    label400:
                    label474:
                    label476:
                    localObject1 = this.f.eb().l();
                    localn_1 = (f.n_)((List)localObject1).get(((List)localObject1).size() - 1);
                    if (!localn_1.l().isEmpty()) {
                      localObject1 = localn_1.l();
                    }
                    while (i5 != 0)
                    {
                      localn_1 = (f.n_)((List)localObject1).get(((List)localObject1).size() - 1);
                      if (i5 != 0) {
                        break label591;
                      }
                      if (bool) {
                        break label590;
                      }
                      if (!bool) {
                        break;
                      }
                    }
                    this.n = localn_1;
                  }
                }
                label590:
                label591:
                return true;
              }
              f.p_ localp_1 = this.f.eb().a(paramDouble1, paramDouble2);
              Object localObject2;
              label757:
              Object localObject3;
              Object localObject4;
              if ((i5 != 0) || (localp_1 != null))
              {
                localObject1 = localp_1.h();
                if (i5 != 0) {
                  break label904;
                }
                int i1 = a(new t(((Rectangle2D)localObject1).getX(), ((Rectangle2D)localObject1).getY(), ((Rectangle2D)localObject1).getWidth(), ((Rectangle2D)localObject1).getHeight()), paramDouble1, paramDouble2, n());
                if (i1 == 3)
                {
                  this.u = 3;
                  f.p_ localp_2 = localp_1;
                  do
                  {
                    if (localp_2.o().isEmpty()) {
                      break;
                    }
                    localObject2 = localp_2.o();
                    localp_2 = (f.p_)((List)localObject2).get(((List)localObject2).size() - 1);
                    if ((i5 == 0) && (bool)) {
                      break label757;
                    }
                  } while (!bool);
                  if (i5 == 0) {
                    this.l = localp_2;
                  }
                  localObject2 = null;
                  for (localObject3 = localp_2; (localObject3 instanceof f.p_); localObject3 = ((f.p_)localObject4).a())
                  {
                    localObject4 = (f.p_)localObject3;
                    int i3 = ((f.p_)localObject4).b();
                    if (i5 == 0) {
                      if (((f.p_)localObject4).a().n() > i3 + 1)
                      {
                        localObject2 = ((f.p_)localObject4).a().e(i3 + 1);
                        break;
                      }
                    }
                  }
                  if ((i5 != 0) || (localObject2 != null))
                  {
                    if (((f.p_)localObject2).n() > 0) {
                      localObject2 = ((f.p_)localObject2).e(0);
                    }
                    for (;;)
                    {
                      if (i5 == 0) {
                        if (!bool)
                        {
                          if (!bool) {
                            break;
                          }
                          if (i5 != 0) {
                            continue;
                          }
                          this.m = ((f.p_)localObject2);
                        }
                      }
                    }
                  }
                  return true;
                }
              }
              label904:
              Object localObject1 = this.f.eb().b(paramDouble1, paramDouble2);
              if (i5 != 0) {
                break label1218;
              }
              if (localObject1 != null)
              {
                Rectangle2D localRectangle2D = ((f.n_)localObject1).h();
                int i2 = a(new t(localRectangle2D.getX(), localRectangle2D.getY(), localRectangle2D.getWidth(), localRectangle2D.getHeight()), paramDouble1, paramDouble2, n());
                if (i5 != 0) {
                  break label1219;
                }
                if (i2 == 4)
                {
                  this.u = 4;
                  localObject2 = localObject1;
                  do
                  {
                    if (((f.n_)localObject2).l().isEmpty()) {
                      break;
                    }
                    localObject3 = ((f.n_)localObject2).l();
                    localObject2 = (f.n_)((List)localObject3).get(((List)localObject3).size() - 1);
                    if ((i5 == 0) && (bool)) {
                      break label1068;
                    }
                  } while (!bool);
                  if (i5 == 0) {
                    this.n = ((f.n_)localObject2);
                  }
                  label1068:
                  localObject3 = null;
                  f.n_ localn_2;
                  for (localObject4 = localObject2; (localObject4 instanceof f.n_); localObject4 = localn_2.a())
                  {
                    localn_2 = (f.n_)localObject4;
                    int i4 = localn_2.b();
                    if (i5 == 0) {
                      if (localn_2.a().k() > i4 + 1)
                      {
                        localObject3 = localn_2.a().c(i4 + 1);
                        break;
                      }
                    }
                  }
                  if ((i5 != 0) || (localObject3 != null))
                  {
                    if (((f.n_)localObject3).k() > 0) {
                      localObject3 = ((f.n_)localObject3).c(0);
                    }
                    for (;;)
                    {
                      if (i5 == 0) {
                        if (!bool)
                        {
                          if (!bool) {
                            break;
                          }
                          if (i5 != 0) {
                            continue;
                          }
                          this.o = ((f.n_)localObject3);
                        }
                      }
                    }
                  }
                  return true;
                }
              }
            }
          }
        }
      }
    }
    label1215:
    g();
    label1218:
    label1219:
    return false;
  }
  
  protected boolean h(ng paramng)
  {
    if (f.Wb == 0) {}
    return (paramng.e() & 0x40) != 0;
  }
  
  private byte a(t paramt, double paramDouble1, double paramDouble2, double paramDouble3)
  {
    int i1 = f.Wb;
    t localt = new t(paramt.d - paramDouble3, paramt.e - paramDouble3, 2.0D * paramDouble3, paramt.b + 2.0D * paramDouble3);
    if (i1 == 0)
    {
      if (localt.a(paramDouble1, paramDouble2)) {
        return 2;
      }
      localt = new t(paramt.d + paramt.a - paramDouble3, paramt.e - paramDouble3, 2.0D * paramDouble3, paramt.b + 2.0D * paramDouble3);
    }
    if (i1 == 0)
    {
      if (localt.a(paramDouble1, paramDouble2)) {
        return 4;
      }
      localt = new t(paramt.d - paramDouble3, paramt.e - paramDouble3, paramt.a + 2.0D * paramDouble3, 2.0D * paramDouble3);
    }
    if (i1 == 0)
    {
      if (localt.a(paramDouble1, paramDouble2)) {
        return 1;
      }
      localt = new t(paramt.d - paramDouble3, paramt.e + paramt.b - paramDouble3, paramt.a + 2.0D * paramDouble3, paramt.b + 2.0D * paramDouble3);
    }
    if (i1 == 0) {
      if (localt.a(paramDouble1, paramDouble2)) {
        return 3;
      }
    }
    return 0;
  }
  
  private void i()
  {
    this.l = null;
    this.m = null;
    this.n = null;
    this.o = null;
    this.u = 0;
    this.k = null;
    this.M = false;
  }
  
  private void a(g paramg, f paramf)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    this.B = -1.797693134862316E+308D;
    this.C = 1.7976931348623157E+308D;
    if (i1 == 0) {}
    switch (this.u)
    {
    case 1: 
      if ((i1 != 0) || (this.l != null)) {
        if (i1 == 0)
        {
          this.C = a(paramg, paramf, this.l);
          if (!bool) {
            return;
          }
        }
      }
      break;
    case 3: 
      if (i1 == 0) {
        if (this.l != null) {
          this.B = (-c(paramg, paramf, this.l));
        }
      }
      if (((i1 != 0) || (this.M)) && ((i1 != 0) || (this.m != null))) {
        if (i1 == 0)
        {
          this.C = a(paramg, paramf, this.m);
          if (!bool) {
            return;
          }
        }
      }
      break;
    case 2: 
      if ((i1 != 0) || (this.n != null)) {
        if (i1 == 0)
        {
          this.C = a(paramg, paramf, this.n);
          if (!bool) {
            return;
          }
        }
      }
      break;
    case 4: 
      if (i1 == 0) {
        if (this.n != null) {
          this.B = (-c(paramg, paramf, this.n));
        }
      }
      if (((i1 != 0) || (this.M)) && ((i1 != 0) || (this.o != null))) {
        this.C = a(paramg, paramf, this.o);
      }
      break;
    }
  }
  
  private double a(g paramg, f paramf, f.p_ paramp_)
  {
    int i3 = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramp_.g() - this.N.a(paramp_);
    u localu = paramp_.i();
    if ((paramg != null) && (paramf != null))
    {
      Rectangle2D localRectangle2D = paramp_.h();
      double d2 = localRectangle2D.getMinY();
      if (localu != null) {
        d2 += localu.b;
      }
      int i1 = l();
      Object localObject1;
      if ((i3 != 0) || (3 == i1))
      {
        int i2 = 1;
        localObject1 = paramp_;
        Object localObject2;
        do
        {
          if (!(localObject1 instanceof f.p_)) {
            break;
          }
          localObject2 = (f.p_)localObject1;
          localObject1 = ((f.p_)localObject2).a();
          if ((i3 == 0) && (bool)) {
            break label167;
          }
          if (i3 == 0) {}
          i2 &= (((f.p_)localObject2).b() == 0 ? 1 : 0);
        } while (!bool);
        if ((i3 == 0) && (i2 != 0))
        {
          label167:
          localObject2 = b(paramg, paramf);
          if (((i3 != 0) || (((Rectangle2D)localObject2).getWidth() > 0.0D)) && ((i3 != 0) || (((Rectangle2D)localObject2).getHeight() > 0.0D)))
          {
            if (i3 == 0) {
              if (((Rectangle2D)localObject2).getY() < d2) {
                return 0.0D;
              }
            }
            if (i3 == 0)
            {
              if (d1 > ((Rectangle2D)localObject2).getY() - d2) {
                d1 = ((Rectangle2D)localObject2).getY() - d2;
              }
            }
            else if (!bool) {}
          }
        }
      }
      else
      {
        w localw = paramp_.d().l();
        label352:
        do
        {
          if (!localw.e()) {
            break;
          }
          localObject1 = paramg.w(localw.d());
          if (bool) {
            break label399;
          }
          double d3 = 0.0D;
          if (i3 == 0)
          {
            if (1 == i1)
            {
              d3 = ((ld)localObject1).B();
              if (i3 != 0) {
                break label352;
              }
              if (!bool) {}
            }
            else
            {
              if (i3 != 0) {
                break label352;
              }
            }
          }
          else if (2 == i1) {
            d3 = ((ld)localObject1).b();
          }
          if (i3 == 0) {
            if (d3 < d2) {
              return 0.0D;
            }
          }
          if (i3 == 0)
          {
            if (d3 - d2 < d1) {
              d1 = d3 - d2;
            }
            localw.f();
          }
        } while (!bool);
      }
    }
    label399:
    return d1;
  }
  
  private double c(g paramg, f paramf, f.p_ paramp_)
  {
    int i3 = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramp_.g() - this.N.a(paramp_);
    u localu = paramp_.i();
    if ((paramg != null) && (paramf != null))
    {
      Rectangle2D localRectangle2D = paramp_.h();
      double d2 = localRectangle2D.getMaxY();
      if (localu != null) {
        d2 -= localu.d;
      }
      int i1 = l();
      Object localObject1;
      if ((i3 != 0) || (3 == i1))
      {
        int i2 = 1;
        localObject1 = paramp_;
        Object localObject2;
        do
        {
          if (!(localObject1 instanceof f.p_)) {
            break;
          }
          localObject2 = (f.p_)localObject1;
          localObject1 = ((f.p_)localObject2).a();
          if ((i3 == 0) && (bool)) {
            break label176;
          }
          if (i3 == 0) {}
          i2 &= (((f.p_)localObject2).b() == ((f.q_)localObject1).n() - 1 ? 1 : 0);
        } while (!bool);
        if ((i3 == 0) && (i2 != 0))
        {
          label176:
          localObject2 = b(paramg, paramf);
          if (((i3 != 0) || (((Rectangle2D)localObject2).getWidth() > 0.0D)) && ((i3 != 0) || (((Rectangle2D)localObject2).getHeight() > 0.0D)))
          {
            if (i3 == 0) {
              if (((Rectangle2D)localObject2).getMaxY() > d2) {
                return 0.0D;
              }
            }
            if (i3 == 0)
            {
              if (d1 > d2 - ((Rectangle2D)localObject2).getMaxY()) {
                d1 = d2 - ((Rectangle2D)localObject2).getMaxY();
              }
            }
            else if (!bool) {}
          }
        }
      }
      else
      {
        w localw = paramp_.d().l();
        label367:
        do
        {
          if (!localw.e()) {
            break;
          }
          localObject1 = paramg.w(localw.d());
          if (bool) {
            break label414;
          }
          double d3 = 0.0D;
          if (i3 == 0)
          {
            if (i1 == 1)
            {
              d3 = ((ld)localObject1).B();
              if (i3 != 0) {
                break label367;
              }
              if (!bool) {}
            }
            else
            {
              if (i3 != 0) {
                break label367;
              }
            }
          }
          else if (i1 == 2) {
            d3 = ((ld)localObject1).b() + ((ld)localObject1).d();
          }
          if (i3 == 0) {
            if (d3 > d2) {
              return 0.0D;
            }
          }
          if (i3 == 0)
          {
            if (d2 - d3 < d1) {
              d1 = d2 - d3;
            }
            localw.f();
          }
        } while (!bool);
      }
    }
    label414:
    return d1;
  }
  
  private double a(g paramg, f paramf, f.n_ paramn_)
  {
    int i3 = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramn_.g() - this.N.a(paramn_);
    u localu = paramn_.i();
    if ((paramg != null) && (paramf != null))
    {
      Rectangle2D localRectangle2D = paramn_.h();
      double d2 = localRectangle2D.getMinX();
      if (localu != null) {
        d2 += localu.c;
      }
      int i1 = l();
      Object localObject1;
      if ((i3 != 0) || (3 == i1))
      {
        int i2 = 1;
        localObject1 = paramn_;
        Object localObject2;
        do
        {
          if (!(localObject1 instanceof f.n_)) {
            break;
          }
          localObject2 = (f.n_)localObject1;
          localObject1 = ((f.n_)localObject2).a();
          if ((i3 == 0) && (bool)) {
            break label167;
          }
          if (i3 == 0) {}
          i2 &= (((f.n_)localObject2).b() == 0 ? 1 : 0);
        } while (!bool);
        if ((i3 == 0) && (i2 != 0))
        {
          label167:
          localObject2 = b(paramg, paramf);
          if (((i3 != 0) || (((Rectangle2D)localObject2).getWidth() > 0.0D)) && ((i3 != 0) || (((Rectangle2D)localObject2).getHeight() > 0.0D)))
          {
            if (i3 == 0) {
              if (((Rectangle2D)localObject2).getX() < d2) {
                return 0.0D;
              }
            }
            if (i3 == 0)
            {
              if (d1 > ((Rectangle2D)localObject2).getX() - d2) {
                d1 = ((Rectangle2D)localObject2).getX() - d2;
              }
            }
            else if (!bool) {}
          }
        }
      }
      else
      {
        w localw = paramn_.d().l();
        label356:
        do
        {
          if (!localw.e()) {
            break;
          }
          localObject1 = localw.d();
          if (bool) {
            break label403;
          }
          double d3 = 0.0D;
          if (i3 == 0)
          {
            if (i1 == 1)
            {
              d3 = paramg.w((a.c.e)localObject1).A();
              if (i3 != 0) {
                break label356;
              }
              if (!bool) {}
            }
            else
            {
              if (i3 != 0) {
                break label356;
              }
            }
          }
          else if (i1 == 2) {
            d3 = paramg.w((a.c.e)localObject1).a();
          }
          if (i3 == 0) {
            if (d3 < d2) {
              return 0.0D;
            }
          }
          if (i3 == 0)
          {
            if (d3 - d2 < d1) {
              d1 = d3 - d2;
            }
            localw.f();
          }
        } while (!bool);
      }
    }
    label403:
    return d1;
  }
  
  private double c(g paramg, f paramf, f.n_ paramn_)
  {
    int i3 = f.Wb;
    boolean bool = f.Vb;
    double d1 = paramn_.g() - this.N.a(paramn_);
    u localu = paramn_.i();
    if ((paramg != null) && (paramf != null))
    {
      Rectangle2D localRectangle2D = paramn_.h();
      double d2 = localRectangle2D.getMaxX();
      if (localu != null) {
        d2 -= localu.e;
      }
      int i1 = l();
      Object localObject1;
      if ((i3 != 0) || (3 == i1))
      {
        int i2 = 1;
        localObject1 = paramn_;
        Object localObject2;
        do
        {
          if (!(localObject1 instanceof f.n_)) {
            break;
          }
          localObject2 = (f.n_)localObject1;
          localObject1 = ((f.n_)localObject2).a();
          if ((i3 == 0) && (bool)) {
            break label176;
          }
          if (i3 == 0) {}
          i2 &= (((f.n_)localObject2).b() == ((f.o_)localObject1).k() - 1 ? 1 : 0);
        } while (!bool);
        if ((i3 == 0) && (i2 != 0))
        {
          label176:
          localObject2 = b(paramg, paramf);
          if (((i3 != 0) || (((Rectangle2D)localObject2).getWidth() > 0.0D)) && ((i3 != 0) || (((Rectangle2D)localObject2).getHeight() > 0.0D)))
          {
            if (i3 == 0) {
              if (((Rectangle2D)localObject2).getMaxX() > d2) {
                return 0.0D;
              }
            }
            if (i3 == 0)
            {
              if (d1 > d2 - ((Rectangle2D)localObject2).getMaxX()) {
                d1 = d2 - ((Rectangle2D)localObject2).getMaxX();
              }
            }
            else if (!bool) {}
          }
        }
      }
      else
      {
        w localw = paramn_.d().l();
        label375:
        do
        {
          if (!localw.e()) {
            break;
          }
          localObject1 = localw.d();
          if (bool) {
            break label422;
          }
          double d3 = 0.0D;
          if (i3 == 0)
          {
            if (i1 == 1)
            {
              d3 = paramg.w((a.c.e)localObject1).A();
              if (i3 != 0) {
                break label375;
              }
              if (!bool) {}
            }
            else
            {
              if (i3 != 0) {
                break label375;
              }
            }
          }
          else if (i1 == 2) {
            d3 = paramg.w((a.c.e)localObject1).a() + paramg.w((a.c.e)localObject1).c();
          }
          if (i3 == 0) {
            if (d3 > d2) {
              return 0.0D;
            }
          }
          if (i3 == 0)
          {
            if (d2 - d3 < d1) {
              d1 = d2 - d3;
            }
            localw.f();
          }
        } while (!bool);
      }
    }
    label422:
    return d1;
  }
  
  private static Rectangle2D b(g paramg, f paramf)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    Rectangle2D.Double localDouble = new Rectangle2D.Double(0.0D, 0.0D, -1.0D, -1.0D);
    j localj = paramg.K();
    if (localj != null)
    {
      a.c.e locale = paramf.n();
      if (((i1 != 0) || (locale != null)) && (locale.g() == paramg) && ((i1 != 0) || (localj.m(locale))))
      {
        w localw = localj.r(locale);
        do
        {
          if (!localw.e()) {
            break;
          }
          paramg.w(localw.d()).b(localDouble);
          localw.f();
        } while (!bool);
      }
    }
    return localDouble;
  }
  
  protected void a(double paramDouble1, double paramDouble2, boolean paramBoolean)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    if (i1 == 0) {
      if (!a(paramDouble1, paramDouble2))
      {
        k();
        return;
      }
    }
    if (i1 == 0)
    {
      if (this.f == null)
      {
        k();
        return;
      }
      this.w = paramDouble1;
      this.x = paramDouble2;
      this.D = 0.0D;
      this.E = 0.0D;
    }
    this.M = (((i1 == 0) && (paramBoolean)) || ((3 == l()) && (((i1 == 0) && (this.o != null)) || (this.m != null))));
    a(this.e.a(), this.f);
    if (i1 == 0) {
      if (this.l != null)
      {
        this.y = this.l.h();
        this.F.a(a(this.l, this.y));
        if (i1 != 0) {
          break label348;
        }
        if (!this.M) {
          break label333;
        }
        this.z = this.m.h();
        this.G.a(a(this.m, this.z));
        if (i1 != 0) {
          break label348;
        }
        if (!bool) {
          break label333;
        }
      }
    }
    if (i1 == 0)
    {
      if (this.n != null)
      {
        this.y = this.n.h();
        this.F.a(a(this.n, this.y));
      }
    }
    else
    {
      if (i1 != 0) {
        break label348;
      }
      if (!this.M) {
        break label333;
      }
      this.z = this.o.h();
      this.G.a(a(this.o, this.z));
      if (i1 != 0) {
        break label348;
      }
      if (!bool) {
        break label333;
      }
    }
    throw new IllegalStateException("A resize action was started although no row or column was set to be resized.");
    label333:
    this.e.a(this.F);
    label348:
    if (i1 == 0) {
      if (this.M) {
        this.e.a(this.G);
      }
    }
    if (i1 == 0) {
      if (m())
      {
        this.A = new Rectangle2D.Double(this.f.a(), this.f.b(), this.f.c(), this.f.d());
        this.H.a(a(this.f.eb(), this.A));
        this.e.a(this.H);
        this.e.a(this.H.getBounds());
        if (i1 == 0) {
          if (!bool) {
            return;
          }
        }
      }
      else
      {
        this.e.a(this.F.getBounds());
      }
    }
    if ((i1 != 0) || (this.M)) {
      this.e.a(this.G.getBounds());
    }
  }
  
  protected void b(double paramDouble1, double paramDouble2)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    this.D = Math.min(Math.max(paramDouble1 - this.w, this.B), this.C);
    this.E = Math.min(Math.max(paramDouble2 - this.x, this.B), this.C);
    if (i1 == 0) {
      switch (this.u)
      {
      case 1: 
        this.F.a(a(this.l, new Rectangle2D.Double(this.y.getX(), this.y.getY() + this.E, this.y.getWidth(), this.y.getHeight() - this.E)));
        if (i1 == 0) {
          if (m())
          {
            this.H.a(a(this.k, new Rectangle2D.Double(this.A.getX(), this.A.getY() + this.E, this.A.getWidth(), this.A.getHeight() - this.E)));
            if (i1 != 0) {
              return;
            }
            if (!bool) {
              break;
            }
          }
        }
        break;
      case 3: 
        this.F.a(a(this.l, new Rectangle2D.Double(this.y.getX(), this.y.getY(), this.y.getWidth(), this.y.getHeight() + this.E)));
        if (i1 == 0)
        {
          if (this.M)
          {
            this.G.a(a(this.m, new Rectangle2D.Double(this.z.getX(), this.z.getY() + this.E, this.z.getWidth(), this.z.getHeight() - this.E)));
            if (i1 != 0) {
              return;
            }
            if (!bool) {
              break;
            }
          }
          else
          {
            if (i1 != 0) {
              break label799;
            }
          }
        }
        else if (m())
        {
          this.H.a(a(this.k, new Rectangle2D.Double(this.A.getX(), this.A.getY(), this.A.getWidth(), this.A.getHeight() + this.E)));
          if (i1 != 0) {
            return;
          }
          if (!bool) {
            break;
          }
        }
        break;
      case 2: 
        this.F.a(a(this.n, new Rectangle2D.Double(this.y.getX() + this.D, this.y.getY(), this.y.getWidth() - this.D, this.y.getHeight())));
        if (i1 == 0) {
          if (m())
          {
            this.H.a(a(this.k, new Rectangle2D.Double(this.A.getX() + this.D, this.A.getY(), this.A.getWidth() - this.D, this.A.getHeight())));
            if (i1 != 0) {
              return;
            }
            if (!bool) {
              break;
            }
          }
        }
        break;
      case 4: 
        this.F.a(a(this.n, new Rectangle2D.Double(this.y.getX(), this.y.getY(), this.y.getWidth() + this.D, this.y.getHeight())));
        if (i1 == 0)
        {
          if (this.M)
          {
            this.G.a(a(this.o, new Rectangle2D.Double(this.z.getX() + this.D, this.z.getY(), this.z.getWidth() - this.D, this.z.getHeight())));
            if (i1 != 0) {
              return;
            }
            if (!bool) {
              break;
            }
          }
          else
          {
            if (i1 != 0) {
              break label799;
            }
          }
        }
        else if (m()) {
          this.H.a(a(this.k, new Rectangle2D.Double(this.A.getX(), this.A.getY(), this.A.getWidth() + this.D, this.A.getHeight())));
        }
        break;
      }
    }
    label799:
    this.e.a().gb();
  }
  
  protected void c(double paramDouble1, double paramDouble2)
  {
    j();
    k();
  }
  
  protected void j()
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    if (i1 == 0) {
      if (this.f == null) {
        return;
      }
    }
    a.c.e locale = this.f.n();
    g localg = (g)locale.g();
    if ((localg == null) || (((i1 != 0) || (this.l == null)) && (this.n == null))) {
      return;
    }
    localg.z();
    try
    {
      localg.a(new bb(locale).l());
      ld localld = a(localg, locale);
      if (i1 == 0) {
        if (localld == this.f)
        {
          if (i1 == 0) {
            if (this.l != null)
            {
              a(localg, this.f, this.l, this.m);
              if (i1 != 0) {
                return;
              }
              if (!bool) {
                break label334;
              }
            }
          }
          if ((i1 == 0) && (this.n == null)) {
            break label334;
          }
          a(localg, this.f, this.n, this.o);
          if (i1 != 0) {
            return;
          }
          if (!bool) {
            break label334;
          }
        }
      }
      if ((i1 != 0) || ((localld instanceof f)))
      {
        f localf = (f)localld;
        ArrayList localArrayList;
        if (i1 == 0) {
          if (this.l != null)
          {
            localArrayList = new ArrayList();
            if (i1 == 0) {}
            a(localg, localf, m.a(this.l, localf, localArrayList), this.m == null ? null : m.a(this.m, localf, localArrayList));
            if (i1 != 0) {
              return;
            }
            if (!bool) {
              break label334;
            }
          }
        }
        if (this.n != null)
        {
          localArrayList = new ArrayList();
          if (i1 == 0) {}
          a(localg, localf, m.a(this.n, localf, localArrayList), this.o == null ? null : m.a(this.o, localf, localArrayList));
        }
      }
    }
    finally
    {
      label334:
      localg.A();
    }
  }
  
  private void a(g paramg, f paramf, f.n_ paramn_1, f.n_ paramn_2)
  {
    int i2 = f.Wb;
    boolean bool = f.Vb;
    Object localObject2;
    label192:
    Object localObject1;
    if (i2 == 0) {
      if (3 == l())
      {
        if (i2 == 0)
        {
          int i1;
          f.n_ localn_;
          switch (this.u)
          {
          case 2: 
            paramn_1.b(paramn_1.g() - this.D);
            if (i2 != 0) {
              break label537;
            }
            if (paramn_1.b() == 0)
            {
              i1 = 1;
              localObject2 = paramn_1.a();
              do
              {
                if (!(localObject2 instanceof f.n_)) {
                  break;
                }
                localn_ = (f.n_)localObject2;
                localn_.b(localn_.g() - this.D);
                localObject2 = localn_.a();
                if ((i2 == 0) && (bool)) {
                  break label192;
                }
                if (i2 == 0) {}
                i1 &= (localn_.b() == 0 ? 1 : 0);
              } while (!bool);
              if (i2 != 0) {
                break label535;
              }
              if (i1 != 0)
              {
                a(paramf, paramf.a() + this.D, paramf.b(), paramf.c() - this.D, paramf.d());
                if (i2 != 0) {
                  break label537;
                }
                if (!bool) {
                  break;
                }
              }
            }
            break;
          case 4: 
            paramn_1.b(paramn_1.g() + this.D);
            if (i2 == 0) {
              if (paramn_1.b() == paramn_1.a().k() - 1)
              {
                i1 = 1;
                localObject2 = paramn_1.a();
                do
                {
                  if (!(localObject2 instanceof f.n_)) {
                    break;
                  }
                  localn_ = (f.n_)localObject2;
                  localn_.b(localn_.g() + this.D);
                  localObject2 = localn_.a();
                  if ((i2 == 0) && (bool)) {
                    break label389;
                  }
                  if (i2 == 0) {}
                  i1 &= (localn_.b() == ((f.o_)localObject2).k() - 1 ? 1 : 0);
                } while (!bool);
                if ((i2 == 0) && (i1 != 0)) {
                  label389:
                  a(paramf, paramf.a(), paramf.b(), paramf.c() + this.D, paramf.d());
                }
              }
            }
            if (i2 != 0) {
              break label537;
            }
            if (this.M)
            {
              paramn_2.b(paramn_2.g() - this.D);
              if (i2 != 0) {
                break label537;
              }
              if (paramn_2.b() == 0)
              {
                localObject1 = paramn_2.a();
                do
                {
                  if (!(localObject1 instanceof f.n_)) {
                    break;
                  }
                  localObject2 = (f.n_)localObject1;
                  ((f.n_)localObject2).b(((f.n_)localObject2).g() - this.D);
                  localObject1 = ((f.n_)localObject2).a();
                  if ((i2 == 0) && (bool)) {
                    return;
                  }
                } while (!bool);
              }
            }
            break;
          }
          if (i2 != 0) {
            return;
          }
        }
        label535:
        label537:
        if ((i2 == 0) && (!bool)) {
          return;
        }
      }
    }
    if (i2 == 0) {}
    switch (this.u)
    {
    case 2: 
      this.N.a(paramn_1, paramn_1.g() - this.D, true);
      localObject1 = new bb();
      this.N.a(paramf.n(), paramf.O(), (Collection)localObject1);
      localObject2 = new h();
      this.N.a(paramg, paramf.O(), (Collection)localObject2);
      paramf.a(paramf.a() + this.D, paramf.b(), paramf.c(), paramf.d());
      this.N.a(paramg, (bb)localObject1, (h)localObject2, this.D, 0.0D);
      if (i2 == 0) {
        if (!bool) {
          return;
        }
      }
    case 4: 
      this.N.a(paramn_1, paramn_1.g() + this.D, false);
      if ((i2 != 0) || (this.M)) {
        this.N.a(paramn_2, paramn_2.g() - this.D, true);
      }
      break;
    }
  }
  
  private void a(g paramg, f paramf, f.p_ paramp_1, f.p_ paramp_2)
  {
    int i2 = f.Wb;
    boolean bool = f.Vb;
    Object localObject2;
    label192:
    Object localObject1;
    if (i2 == 0) {
      if (3 == l())
      {
        if (i2 == 0)
        {
          int i1;
          f.p_ localp_;
          switch (this.u)
          {
          case 1: 
            paramp_1.b(paramp_1.g() - this.E);
            if (i2 != 0) {
              break label537;
            }
            if (paramp_1.b() == 0)
            {
              i1 = 1;
              localObject2 = paramp_1.a();
              do
              {
                if (!(localObject2 instanceof f.p_)) {
                  break;
                }
                localp_ = (f.p_)localObject2;
                localp_.b(localp_.g() - this.E);
                localObject2 = localp_.a();
                if ((i2 == 0) && (bool)) {
                  break label192;
                }
                if (i2 == 0) {}
                i1 &= (localp_.b() == 0 ? 1 : 0);
              } while (!bool);
              if (i2 != 0) {
                break label535;
              }
              if (i1 != 0)
              {
                a(paramf, paramf.a(), paramf.b() + this.E, paramf.c(), paramf.d() - this.E);
                if (i2 != 0) {
                  break label537;
                }
                if (!bool) {
                  break;
                }
              }
            }
            break;
          case 3: 
            paramp_1.b(paramp_1.g() + this.E);
            if (i2 == 0) {
              if (paramp_1.b() == paramp_1.a().n() - 1)
              {
                i1 = 1;
                localObject2 = paramp_1.a();
                do
                {
                  if (!(localObject2 instanceof f.p_)) {
                    break;
                  }
                  localp_ = (f.p_)localObject2;
                  localp_.b(localp_.g() + this.E);
                  localObject2 = localp_.a();
                  if ((i2 == 0) && (bool)) {
                    break label389;
                  }
                  if (i2 == 0) {}
                  i1 &= (localp_.b() == ((f.q_)localObject2).n() - 1 ? 1 : 0);
                } while (!bool);
                if ((i2 == 0) && (i1 != 0)) {
                  label389:
                  a(paramf, paramf.a(), paramf.b(), paramf.c(), paramf.d() + this.E);
                }
              }
            }
            if (i2 != 0) {
              break label537;
            }
            if (this.M)
            {
              paramp_2.b(paramp_2.g() - this.E);
              if (i2 != 0) {
                break label537;
              }
              if (paramp_2.b() == 0)
              {
                localObject1 = paramp_2.a();
                do
                {
                  if (!(localObject1 instanceof f.p_)) {
                    break;
                  }
                  localObject2 = (f.p_)localObject1;
                  ((f.p_)localObject2).b(((f.p_)localObject2).g() - this.E);
                  localObject1 = ((f.p_)localObject2).a();
                  if ((i2 == 0) && (bool)) {
                    return;
                  }
                } while (!bool);
              }
            }
            break;
          }
          if (i2 != 0) {
            return;
          }
        }
        label535:
        label537:
        if ((i2 == 0) && (!bool)) {
          return;
        }
      }
    }
    if (i2 == 0) {}
    switch (this.u)
    {
    case 1: 
      this.N.a(paramp_1, paramp_1.g() - this.E, true);
      localObject1 = new bb();
      this.N.a(paramf.n(), paramf.O(), (Collection)localObject1);
      localObject2 = new h();
      this.N.a(paramg, paramf.O(), (Collection)localObject2);
      paramf.a(paramf.a(), paramf.b() + this.E, paramf.c(), paramf.d());
      this.N.a(paramg, (bb)localObject1, (h)localObject2, 0.0D, this.E);
      if (i2 == 0) {
        if (!bool) {
          return;
        }
      }
    case 3: 
      this.N.a(paramp_1, paramp_1.g() + this.E, false);
      if ((i2 != 0) || (this.M)) {
        this.N.a(paramp_2, paramp_2.g() - this.E, true);
      }
      break;
    }
  }
  
  private static void a(f paramf, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    int i1 = f.Wb;
    b localb = paramf.K();
    if ((i1 != 0) || (localb != null)) {
      if (i1 != 0) {}
    }
    boolean bool1 = localb.e();
    if (i1 == 0) {
      if (bool1) {
        localb.a(false);
      }
    }
    try
    {
      boolean bool2 = paramf.Z();
      if (i1 == 0) {
        if (bool2) {
          paramf.g(false);
        }
      }
      try
      {
        paramf.a(paramDouble1, paramDouble2, paramDouble3, paramDouble4);
        if (i1 != 0) {}
      }
      finally
      {
        if (bool2) {
          paramf.g(bool2);
        }
      }
    }
    finally
    {
      if (bool1) {
        localb.a(bool1);
      }
    }
  }
  
  private void k()
  {
    int i1 = f.Wb;
    i();
    if (i1 == 0) {
      if (this.F.a() != null)
      {
        this.F.a(null);
        this.e.b(this.F);
      }
    }
    if (i1 == 0)
    {
      if (this.G.a() != null)
      {
        this.G.a(null);
        this.e.b(this.G);
      }
      if (i1 != 0) {}
    }
    else
    {
      if (this.H.a() != null)
      {
        this.H.a(null);
        this.e.b(this.H);
      }
      this.e.a().gb();
    }
    d();
  }
  
  protected qb a(f.r_ paramr_, Rectangle2D paramRectangle2D)
  {
    int i1 = f.Wb;
    if ((i1 != 0) || (this.K == null)) {
      this.K = new g.b_();
    }
    if ((i1 != 0) || (paramr_ != null))
    {
      u localu = paramr_.d();
      if (i1 == 0)
      {
        if (localu.b > localu.c)
        {
          this.K.a(false);
          this.K.a(localu.b);
          if (i1 != 0) {
            break label133;
          }
          if (!f.Vb) {}
        }
        else
        {
          this.K.a(true);
        }
      }
      else {
        this.K.a(localu.c);
      }
    }
    this.K.a(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    label133:
    return this.K;
  }
  
  protected qb a(f.p_ paramp_, Rectangle2D paramRectangle2D)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    g.b_ localb_;
    if (i1 == 0) {
      if (paramp_ != null)
      {
        if (i1 != 0) {
          break label66;
        }
        if (paramp_ == this.l)
        {
          if (i1 == 0) {
            if (this.I == null) {
              this.I = new g.b_();
            }
          }
          localb_ = this.I;
          if (!bool) {
            break label117;
          }
        }
      }
    }
    label66:
    if (((i1 != 0) || (paramp_ != null)) && (paramp_ == this.m))
    {
      if (i1 == 0) {
        if (this.J == null) {
          this.J = new g.b_();
        }
      }
      localb_ = this.J;
      if (!bool) {}
    }
    else
    {
      return null;
    }
    label117:
    if (paramp_.i() != null)
    {
      localb_.a(true);
      localb_.a(paramp_.i().c);
    }
    localb_.a(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    return localb_;
  }
  
  protected qb a(f.n_ paramn_, Rectangle2D paramRectangle2D)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    g.b_ localb_;
    if (i1 == 0) {
      if (paramn_ != null)
      {
        if (i1 != 0) {
          break label66;
        }
        if (paramn_ == this.n)
        {
          if (i1 == 0) {
            if (this.I == null) {
              this.I = new g.b_();
            }
          }
          localb_ = this.I;
          if (!bool) {
            break label117;
          }
        }
      }
    }
    label66:
    if (((i1 != 0) || (paramn_ != null)) && (paramn_ == this.o))
    {
      if (i1 == 0) {
        if (this.J == null) {
          this.J = new g.b_();
        }
      }
      localb_ = this.J;
      if (!bool) {}
    }
    else
    {
      return null;
    }
    label117:
    if (paramn_.i() != null)
    {
      localb_.a(false);
      localb_.a(paramn_.i().b);
    }
    localb_.a(paramRectangle2D.getX(), paramRectangle2D.getY(), paramRectangle2D.getWidth(), paramRectangle2D.getHeight());
    return localb_;
  }
  
  public byte l()
  {
    return this.j;
  }
  
  public void a(byte paramByte)
  {
    if (f.Wb == 0) {}
    switch (paramByte)
    {
    case 1: 
    case 2: 
    case 3: 
      this.j = paramByte;
      if (!f.Vb) {
        break;
      }
    default: 
      throw new IllegalArgumentException();
    }
  }
  
  public boolean m()
  {
    return this.L;
  }
  
  public void b(boolean paramBoolean)
  {
    this.L = paramBoolean;
  }
  
  public double n()
  {
    return this.v;
  }
  
  public void a(double paramDouble)
  {
    this.v = paramDouble;
  }
  
  public void d()
  {
    this.e.a(Cursor.getPredefinedCursor(13));
    super.d();
  }
  
  public boolean a(ng paramng)
  {
    int i1 = f.Wb;
    if ((i1 != 0) || (e(paramng))) {
      if (i1 != 0) {}
    }
    return a(paramng.a(), paramng.b());
  }
  
  public void b(ng paramng)
  {
    int i1 = f.Wb;
    boolean bool = f.Vb;
    if (i1 == 0) {}
    switch (paramng.c())
    {
    case 501: 
      if (i1 == 0)
      {
        if (!d(paramng)) {
          return;
        }
        a(paramng.a(), paramng.b(), h(paramng));
      }
      if (i1 == 0) {
        if (!bool) {
          return;
        }
      }
    case 506: 
      b(paramng.a(), paramng.b());
      if ((i1 == 0) && (!bool)) {
        return;
      }
      break;
    case 502: 
      if (i1 == 0)
      {
        if (!d(paramng)) {
          return;
        }
        if (i1 == 0) {
          c(paramng.a(), paramng.b());
        }
      }
      else if (!bool)
      {
        return;
      }
      break;
    }
    k();
  }
  
  public Cursor c(ng paramng)
  {
    int i1 = f.Wb;
    if ((i1 != 0) || (a(paramng.a(), paramng.b())))
    {
      if (i1 == 0) {}
      switch (this.u)
      {
      case 2: 
      case 4: 
        return Cursor.getPredefinedCursor(10);
      case 1: 
      case 3: 
        return Cursor.getPredefinedCursor(8);
      }
      return null;
    }
    return null;
  }
  
  void g()
  {
    super.g();
    this.k = null;
    this.l = null;
    this.m = null;
    this.n = null;
    this.o = null;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.b.e

 * JD-Core Version:    0.7.0.1

 */